
<!doctype html>
<html lang="en" class="no-js">
  <head>
    
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      
      
      
        <link rel="canonical" href="https://asoulrecchan.gitee.io/workguide/recording/bili/blrec/">
      
      <link rel="icon" href="../../../icon.png">
      <meta name="generator" content="mkdocs-1.3.0, mkdocs-material-8.2.8">
    
    
      
        <title>使用 acgnhiki/blrec 项目 - A-SOUL 录播姬工作知识库</title>
      
    
    
      <link rel="stylesheet" href="../../../assets/stylesheets/main.644de097.min.css">
      
        
        <link rel="stylesheet" href="../../../assets/stylesheets/palette.e6a45f82.min.css">
        
      
    
    
    
      
        
        
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
        <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
      
    
    
    <script>__md_scope=new URL("../../..",location),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
    
      

    
    
  </head>
  
  
    
    
    
    
    
    <body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none">
  
    
    
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" for="__drawer"></label>
    <div data-md-component="skip">
      
        
        <a href="#acgnhikiblrec" class="md-skip">
          Skip to content
        </a>
      
    </div>
    <div data-md-component="announce">
      
    </div>
    
    
      

<header class="md-header" data-md-component="header">
  <nav class="md-header__inner md-grid" aria-label="Header">
    <a href="https://asoulrecchan.gitee.io/workguide" title="A-SOUL 录播姬工作知识库" class="md-header__button md-logo" aria-label="A-SOUL 录播姬工作知识库" data-md-component="logo">
      
  <img src="../../../icon.png" alt="logo">

    </a>
    <label class="md-header__button md-icon" for="__drawer">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
    </label>
    <div class="md-header__title" data-md-component="header-title">
      <div class="md-header__ellipsis">
        <div class="md-header__topic">
          <span class="md-ellipsis">
            A-SOUL 录播姬工作知识库
          </span>
        </div>
        <div class="md-header__topic" data-md-component="header-topic">
          <span class="md-ellipsis">
            
              使用 acgnhiki/blrec 项目
            
          </span>
        </div>
      </div>
    </div>
    
    
    
      <label class="md-header__button md-icon" for="__search">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
      </label>
      <div class="md-search" data-md-component="search" role="dialog">
  <label class="md-search__overlay" for="__search"></label>
  <div class="md-search__inner" role="search">
    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
      <label class="md-search__icon md-icon" for="__search">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
      </label>
      <nav class="md-search__options" aria-label="Search">
        
        <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
        </button>
      </nav>
      
    </form>
    <div class="md-search__output">
      <div class="md-search__scrollwrap" data-md-scrollfix>
        <div class="md-search-result" data-md-component="search-result">
          <div class="md-search-result__meta">
            Initializing search
          </div>
          <ol class="md-search-result__list"></ol>
        </div>
      </div>
    </div>
  </div>
</div>
    
    
  </nav>
  
</header>
    
    <div class="md-container" data-md-component="container">
      
      
        
          
        
      
      <main class="md-main" data-md-component="main">
        <div class="md-main__inner md-grid">
          
            
              
              <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    


<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  <label class="md-nav__title" for="__drawer">
    <a href="https://asoulrecchan.gitee.io/workguide" title="A-SOUL 录播姬工作知识库" class="md-nav__button md-logo" aria-label="A-SOUL 录播姬工作知识库" data-md-component="logo">
      
  <img src="../../../icon.png" alt="logo">

    </a>
    A-SOUL 录播姬工作知识库
  </label>
  
  <ul class="md-nav__list" data-md-scrollfix>
    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../../.." class="md-nav__link">
        首页
      </a>
    </li>
  

    
      
      
      

  
  
  
    
      
    
    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2" data-md-state="indeterminate" type="checkbox" id="__nav_2" checked>
      
      
      
      
        <label class="md-nav__link" for="__nav_2">
          录播
          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <nav class="md-nav" aria-label="录播" data-md-level="1">
        <label class="md-nav__title" for="__nav_2">
          <span class="md-nav__icon md-icon"></span>
          录播
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
              
  
  
  
    
    <li class="md-nav__item md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2_1" data-md-state="indeterminate" type="checkbox" id="__nav_2_1" checked>
      
      
      
      
        <label class="md-nav__link" for="__nav_2_1">
          哔哩哔哩
          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <nav class="md-nav" aria-label="哔哩哔哩" data-md-level="2">
        <label class="md-nav__title" for="__nav_2_1">
          <span class="md-nav__icon md-icon"></span>
          哔哩哔哩
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../compare" class="md-nav__link">
        两种录播项目的比较
      </a>
    </li>
  

            
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="." class="md-nav__link">
        使用 acgnhiki/blrec 项目
      </a>
    </li>
  

            
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../luboji" class="md-nav__link">
        使用 哔哩哔哩录播姬
      </a>
    </li>
  

            
          
        </ul>
      </nav>
    </li>
  

            
          
            
              
  
  
  
    
    <li class="md-nav__item md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_2_2" data-md-state="indeterminate" type="checkbox" id="__nav_2_2" checked>
      
      
      
      
        <label class="md-nav__link" for="__nav_2_2">
          抖音直播
          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <nav class="md-nav" aria-label="抖音直播" data-md-level="2">
        <label class="md-nav__title" for="__nav_2_2">
          <span class="md-nav__icon md-icon"></span>
          抖音直播
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../../amemv/traditional" class="md-nav__link">
        传统方法
      </a>
    </li>
  

            
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../../amemv/script" class="md-nav__link">
        监听脚本
      </a>
    </li>
  

            
          
        </ul>
      </nav>
    </li>
  

            
          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
  
    
      
    
    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" data-md-state="indeterminate" type="checkbox" id="__nav_3" checked>
      
      
      
      
        <label class="md-nav__link" for="__nav_3">
          切片
          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <nav class="md-nav" aria-label="切片" data-md-level="1">
        <label class="md-nav__title" for="__nav_3">
          <span class="md-nav__icon md-icon"></span>
          切片
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../../../cliping/general" class="md-nav__link">
        通用字幕教程
      </a>
    </li>
  

            
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../../../cliping/sing_and_song" class="md-nav__link">
        歌舞内容切片加字幕
      </a>
    </li>
  

            
          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
  
    
      
    
    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" data-md-state="indeterminate" type="checkbox" id="__nav_4" checked>
      
      
      
      
        <label class="md-nav__link" for="__nav_4">
          压制
          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <nav class="md-nav" aria-label="压制" data-md-level="1">
        <label class="md-nav__title" for="__nav_4">
          <span class="md-nav__icon md-icon"></span>
          压制
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../../../encoding/handbrake" class="md-nav__link">
        使用 HandBrake 压制视频
      </a>
    </li>
  

            
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../../../encoding/danmakufactory" class="md-nav__link">
        使用 DanmakuFactory 转换弹幕
      </a>
    </li>
  

            
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../../../encoding/ffmpeg" class="md-nav__link">
        部署 FFMpeg 环境
      </a>
    </li>
  

            
          
        </ul>
      </nav>
    </li>
  

    
      
      
      

  
  
  
    
      
    
    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
      
      
        <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" data-md-state="indeterminate" type="checkbox" id="__nav_5" checked>
      
      
      
      
        <label class="md-nav__link" for="__nav_5">
          速查手册
          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <nav class="md-nav" aria-label="速查手册" data-md-level="1">
        <label class="md-nav__title" for="__nav_5">
          <span class="md-nav__icon md-icon"></span>
          速查手册
        </label>
        <ul class="md-nav__list" data-md-scrollfix>
          
            
              
  
  
  
    <li class="md-nav__item">
      <a href="../../../qrh/description" class="md-nav__link">
        投稿信息速查
      </a>
    </li>
  

            
          
        </ul>
      </nav>
    </li>
  

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              
              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    

<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      Table of contents
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#blrec" class="md-nav__link">
    安装 blrec
  </a>
  
    <nav class="md-nav" aria-label="安装 blrec">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_1" class="md-nav__link">
    一些简单的运行办法...
  </a>
  
    <nav class="md-nav" aria-label="一些简单的运行办法...">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#docker" class="md-nav__link">
    Docker
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#windows" class="md-nav__link">
    Windows 绿色版
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
        
          <li class="md-nav__item">
  <a href="#python" class="md-nav__link">
    配置 Python 环境
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#blrec_1" class="md-nav__link">
    配置 blrec
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#blrec_2" class="md-nav__link">
    使用 blrec
  </a>
  
    <nav class="md-nav" aria-label="使用 blrec">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_2" class="md-nav__link">
    缩略图
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          <div class="md-content" data-md-component="content">
            <article class="md-content__inner md-typeset">
              
                


<h1 id="acgnhikiblrec">使用 acgnhiki/blrec 项目</h1>
<div class="admonition info">
<p class="admonition-title">另请注意：可能不符合您的情况😺</p>
<p>这里前半部分可能对你来说没有什么意义捏... </p>
<p>你可以用目录直接跳到需要的部分哦！</p>
</div>
<h2 id="blrec">安装 blrec</h2>
<h3 id="_1">一些简单的运行办法...</h3>
<h4 id="docker">Docker</h4>
<ul>
<li>
<p>环境变量</p>
<ul>
<li>
<p>默认设置文件位置: <code>ENV DEFAULT_SETTINGS_FILE=/cfg/settings.toml</code></p>
</li>
<li>
<p>默认日志存放目录: <code>ENV DEFAULT_LOG_DIR=/log</code></p>
</li>
<li>
<p>默认录播存放目录: <code>ENV DEFAULT_OUT_DIR=/rec</code></p>
</li>
</ul>
</li>
<li>
<p>默认参数运行</p>
</li>
</ul>
<pre><code>sudo docker run -v /etc/blrec:/cfg -v /var/log/blrec:/log -v ~/blrec:/rec -dp 2233:2233 acgnhiki/blrec
</code></pre>
<ul>
<li>命令行参数用法</li>
</ul>
<pre><code>sudo docker run \
    -v /etc/blrec:/cfg -v /var/log/blrec:/log -v ~/blrec:/rec \
    -dp 2233:2233 acgnhiki/blrec \
    -c /cfg/another_settings.toml \
    --key-file path/to/key-file \
    --cert-file path/to/cert-file \
    --api-key bili2233
</code></pre>
<h4 id="windows">Windows 绿色版</h4>
<p>Windows 64 位系统用户也可以用打包好的免安装绿色版，下载后解压运行 <code>run.bat</code> 即可。</p>
<p>免安装绿色版</p>
<ul>
<li>下载并解压新版本</li>
<li>确保旧版本已经关闭退出以避免之后出现端口冲突</li>
<li>把旧版本的设置文件 <code>settings.toml</code> 复制并覆盖新版本的设置文件</li>
<li>运行新版本的 <code>run.bat</code></li>
</ul>
<h3 id="python">配置 Python 环境</h3>
<p>这段命令参考是针对 Debian/Ubuntu 及衍生发行版的。其他的发行版差异也不大。</p>
<p>如果您用 Windows，您可以前往官网下载安装。安装前可以勾选所有的勾——他们应该是不会伤害你的操作系统。</p>
<p>如果您用其他发行版，我猜您应该会装 :)</p>
<pre><code class="language-bash">sudo apt update &amp;&amp; apt dist-upgrade
sudo apt install python-is-python3 python3 build-essential ffmpeg
</code></pre>
<p>正确配置 Python 环境后，如下命令仅供参考，适合所有发行版。</p>
<p>如果您是 Windows，作者表明有些库需要编译，因而可能需要您安装 MS C++ 构建工具。</p>
<p>详请参阅：https://github.com/acgnhiki/blrec</p>
<pre><code class="language-bash">python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install blrec
</code></pre>
<h2 id="blrec_1">配置 blrec</h2>
<div class="admonition info">
<p class="admonition-title">敬请留意：存储策略</p>
<p>我推荐您使用 “固态转存机械” 或 “固态定期转存云端存储” 的策略，能够有效避免存储时遇到可能的不稳定与低速问题。</p>
<p>您可以用 rclone 对接 Google Drive 或 OneDrive for Business 来节约成本、方便分享，亦可使用各大云盘厂商提供的应用程序自带的同步功能。</p>
<p>同时，如果您使用个人电脑进行录播，不建议您在本地保留过多的录播数据，以免对未来使用和日常生活造成影响。</p>
<p>先要好好吃饭，再来好好看直播，然后才是一起录播和轻松愉快的二创。</p>
</div>
<p><img alt="image-20220428040855014" src="../blrec.assets/image-20220428040855014.png" /></p>
<p><img alt="image-20220428040910814" src="../blrec.assets/image-20220428040910814.png" /></p>
<h2 id="blrec_2">使用 blrec</h2>
<h3 id="_2">缩略图</h3>
<p><img alt="image-20220428041318737" src="../blrec.assets/image-20220428041318737.png" /></p>
<p>其中：</p>
<ul>
<li>
<p>剪刀按钮：从此刻截断录播，生成新的录播文件——二刀流常用</p>
</li>
<li>
<p>齿轮按钮：针对这个直播间，调整特定的录播参数——如果您运行的不是 DD 录播机，您大概也不需要调整。</p>
</li>
<li>
<p>开关：启用/停止这个直播间的录播。正在进行的任务会被结束。</p>
</li>
<li>
<p>更多：</p>
<ul>
<li>刷新数据：重新获取房间状态，多用于显示错误。</li>
<li>显示录制信息：显示录播情况的图表</li>
</ul>
</li>
<li>
<p>点击封面：可进入详情页，对直播录播情况进行检查。</p>
<p><img alt="image-20220428041807914" src="../blrec.assets/image-20220428041807914.png" /></p>
</li>
</ul>
<p><img alt="image-20220428041817410" src="../blrec.assets/image-20220428041817410.png" /></p>

              
            </article>
          </div>
        </div>
        
      </main>
      
        <footer class="md-footer">
  
  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <div class="md-copyright">
  
  
    Made with
    <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
      Material for MkDocs
    </a>
  
</div>
      
    </div>
  </div>
</footer>
      
    </div>
    <div class="md-dialog" data-md-component="dialog">
      <div class="md-dialog__inner md-typeset"></div>
    </div>
    <script id="__config" type="application/json">{"base": "../../..", "features": ["content.code.annotate", "navigation.sections", "navigation.expand", "toc.follow"], "search": "../../../assets/javascripts/workers/search.5e67fbfe.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version.title": "Select version"}}</script>
    
    
      <script src="../../../assets/javascripts/bundle.c44cc438.min.js"></script>
      
    
  </body>
</html>